using System;
using System.Collections.Generic;
using System.Text;
using Mpi.Common.Collections;
using Xeml.Document.Ontologies.OBO;

namespace Xeml.Document.Contracts
{
    public interface IOntologyHandler : IValidationSource, IXemlComponent
    {

        string NameSpace
        {
            get;
        }

        bool AutoValidation
        {
            get;
            set;
        }

        /// <summary>
        /// The location of the ontology instance.
        /// </summary>
        string InstanceLocation
        {
            get;
            set;
        }

        /// <summary>
        /// Contains the result message of the ontology load process.
        /// </summary>
        string OntologyLoadMessage
        {
            get;
        }

        /// <summary>
        /// Indicates the load state fo the ontology.
        /// </summary>
        OntologyLoadState OntologyLoadState
        {
            get;
        }

        /// <summary>
        /// Indicates the type of the ontology
        /// </summary>
        OntologyType OntologyType
        {
            get;
        }

        /// <summary>
        /// Loads the ontology
        /// </summary>
        void Load(string nameSpaceAlias);

        /// <summary>
        /// Loads the ontology
        /// </summary>
        void Load(string nameSpaceAlias, bool force);

        ///// <summary>
        ///// Creates a copy of the current object.
        ///// </summary>
        //IOntologyHandler Copy();

        event LoadedEventHandler OnLoaded;
    }

    public delegate void LoadedEventHandler(Object sender, LoadStateChangedEventArgs e);

    public enum OntologyLoadState
    {
        Unloaded,
        Loaded,
        LoadFailed,
        ReloadNeeded
    }

    public enum OntologyType
    {
        Environment,
        OrganismStructure,
        Developmental,
        Positioning,
        Genotype
    }
}
